package de.gameduell.framework.threads 
{
	import flash.utils.*;
	
	/**
	 * ready to use IThread implementation.
	 * minimal the run() method should always be overwritten.
	 * onStartExecution() and onFinishExecution() can be overwritten if life-cycle-awareness is required.
	 * @author Ferry Trunschke
	 */
	public class ThreadAdapter implements IThread {
		
		public function ThreadAdapter()  {
		}
		
		/* INTERFACE de.gameduell.framework.threads.IThread */
		
		public function run():Boolean {
			// by default stop instant
			return false;
		}
		
		public function onStartExecution():void {
		}
		
		public function onFinishExecution():void {
		}

		public function get isBlockingThread():Boolean {
			// not blocking by default
			return false;
		}
		
		public function get description():String {
			return "ThreadAdapter." + getQualifiedClassName(this);
		}
		
		
	}

}